
use "C:\Users\mcsam\Dropbox\Decomposing Firm Betas\Submissions\JPE Macro\Replication Folder\\Table_4_data",replace
global new_controls "lsale ad_sales rd_sales xad xrd tnic3hhi tnic3tsimm indic_hhi indic_simm"
replace inv_rate=inv_rate*100
** Investment table
reghdfe inv_rate l_q l_q_X_low_sga $new_controls, ab(year gvkey category_year) vce(cluster gvkey) keepsin
outreg2 using "Output/Tables/Churn_Q.tex", title() keep(l_q l_q_X_low_sga) tex(landscape pr frag) drop() label addtext(Firm FE, YES, Year FE, YES, Industry-Year FE, YES, Firm Controls, YES) ctitle("All Firms") nocons replace

reghdfe inv_rate l_q l_q_X_low_sga $new_controls if ind1==5 , ab(year gvkey )  vce(cluster gvkey) 
outreg2 using "Output/Tables/Churn_Q.tex", title() keep(l_q l_q_X_low_sga) tex(landscape pr frag) drop() label addtext(Firm FE, YES, Year FE, YES, Industry-Year FE, NO, Firm Controls, YES) ctitle("Retail") nocons 

reghdfe inv_rate l_q l_q_X_low_sga l_q_X_high_chnew $new_controls, ab(year gvkey category_year) vce(cluster gvkey) keepsin
outreg2 using "Output/Tables/Churn_Q.tex", title() keep(l_q l_q_X_low_sga l_q_X_high_chnew) tex(landscape pr frag) drop() label addtext(Firm FE, YES, Year FE, YES, Industry-Year FE, YES, Firm Controls, YES) ctitle("All Firms") nocons 

reghdfe inv_rate l_q l_q_X_low_sga l_q_X_high_chnew $new_controls if ind1==5 , ab(year gvkey ) vce(cluster gvkey) keepsin
outreg2 using "Output/Tables/Churn_Q.tex", title() keep(l_q l_q_X_low_sga l_q_X_high_chnew) tex(landscape pr frag) drop() label addtext(Firm FE, YES, Year FE, YES, Industry-Year FE, NO, Firm Controls, YES) ctitle("Retail") nocons 
